var UglifyJsPlugin = require("webpack/lib/optimize/UglifyJsPlugin");
// var webpack = require("webpack");

var entry = [
	// "./src/ui/layaUI.max.all.js",
	// "./src/alert/draw.js",
	// "./src/alert/gain.js",
	// "./src/alert/help.js",
];
    
module.exports = {
    entry: entry,
    output: {
        path: __dirname + "/bin",
        filename: "main.min.js"
    },
    module: {
        loaders: [
            {
                test: /\.json$/,
                loader: "json"
            },
            {
                test: /\.js$/,
                exclude: /node_modules/,
                loader: 'babel-loader',//在webpack的module部分的loaders里进行配置即可
                query: {
                    presets: ['latest']
                }
            }
        ]
    },
    plugins: [
        new UglifyJsPlugin({
            compress: {
                warnings: false
            }
        })
    ]
};